import request from '@/utils/request'

// 获取角色列表
export const roleListService = pageParams => request.get('/sys/role', { params: pageParams })

// 新增角色
export const roleAddService = data => request.post('/sys/role', data)

// 修改角色
export const roleUpdateService = data => request.put(`/sys/role/${data.id}`, data)

// 删除角色
export const roleDeleteService = id => request.delete(`/sys/role/${id}`)

// 获取已启用的角色列表
export const roleEnabledListService = () => request.get('/sys/role/list/enabled')

// 获取角色详情
export const roleDetailService = id => request.get(`/sys/role/${id}`)
